<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="<?php echo ($sets->keyword); ?>" />
<meta name="description" content="<?php echo ($sets->description); ?>" />
<link rel="stylesheet" href="__ROOT__/Tpl/Public/css/post.css" />
<script type="text/javascript" src="__ROOT__/Public/Jquery/jquery.js"></script>
<script type="text/javascript" src="__ROOT__/Public/client_remind.js"></script>
<script type="text/javascript" src="__ROOT__/Tpl/Public/js/header.js"></script>
<script type="text/javascript" src="__ROOT__/Tpl/Public/js/index.js"></script>
<script type="text/javascript" src="__ROOT__/Tpl/Public/js/post.js"></script>
<title>三原县信息网 -- 信息修改</title>
</head>
<body>
<link rel="stylesheet" href="__ROOT__/Tpl/Public/css/basic.css" />
<div id="header">
    <div class="top">
        <strong>三原县 　<span><?php echo ($now); ?> <font style="color:#06f;"><?php echo ($hello); ?></font></span></strong>
        <?php if(isset($_COOKIE['user'])): ?><span>欢迎,<b style="color:green;"><?php echo (cookie('user')); ?></b> <a href="__ROOT__/member.php">用户中心</a>|<a href="__ROOT__/User/logout">退出</a></span>
        <?php else: ?>
        <span><a href="<?php echo U('/User/reg');?>">注册</a> | <a href="<?php echo U('/User/login');?>">登陆</a></span><?php endif; ?>
    </div>
    <div class="body">
        <div class="logo"><a href="__ROOT__"><img src="__ROOT__/Tpl/Public/images/logo.gif" alt="网站logo"/></a></div>
        <div class="search">
            <form method="get" action="__ROOT__/Search/index/" class="search">
                <ul>
                    <li class="first"><span>信息</span><img src="__ROOT__/Tpl/Public/images/arrow.png" /></li>
                    <li class="show"><a href="#" title="1">信息</a></li>
                    <li class="show"><a href="#" title="2">新闻</a></li>
                </ul>
                <input type="hidden" name="type" id="type" value="1"/><input type="text" name="keyword" class="stext" value="<?php echo ($_GET['keyword']); ?>" /> <input type="submit" value="搜索" class="sub" />
            </form>
        </div>
        <div class="toppost">
            <a href="<?php echo U('/Post/index');?>" style="color:orange;">免费发布信息</a>
            <a href="__ROOT__/member.php/Index/myInfo" style="color:#666;" class="u">修改删除信息</a>
        </div>
    </div>
</div>
<div id="category">
    <ul>
        <li><a href="__ROOT__">首页</a></li>
        <li><a href="<?php echo U('/News');?>">新闻资讯</a></li>
        <?php if(is_array($teninfonav)): $i = 0; $__LIST__ = $teninfonav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><li><a href="<?php echo U('/Category/index','id='.$value['id']);?>"><?php echo ($value["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        <li><a href="<?php echo U('/About');?>">关于本站</a></li>
    </ul>
</div>

    <div id="map"><img src="__ROOT__/Tpl/Public/images/location.gif" style="position:relative;top:2px;"/>  <a href="/">三原县信息网</a> &gt; <a href="<?php echo U('/Category/index/','id='.$pid);?>"><?php echo ($parentname); ?></a> &gt; <a href="<?php echo U('/Category/index/','id='.$cid);?>"><?php echo ($childname); ?></a> &gt; <?php echo ($title); ?> </div>
    <div id="main" style="height:auto;padding-bottom:40px;">
        <h2>信息修改</h2>
        <form method="post" class="input" name="input">
            <p class="t">请修改信息</p>
            <dl>
                <dd>所属分类：<?php echo ($parentname); ?> &gt;&gt; <?php echo ($childname); ?></dd>
                <dd class="c"><span class="head">有 效 期：</span> <select class="select" name="keep">
                    <option value="" >请 选 择 有 效 期</option>
                    <option value="永久有效" <?php if(($details["keep"]) == "永久有效"): ?>selected="selected"<?php endif; ?>>永 久 有 效</option>
                    <option value="一年" <?php if(($details["keep"]) == "一年"): ?>selected="selected"<?php endif; ?>>一 年</option>
                    <option value="一月" <?php if(($details["keep"]) == "一月"): ?>selected="selected"<?php endif; ?>>一 月</option>
                    <option value="一周" <?php if(($details["keep"]) == "一周"): ?>selected="selected"<?php endif; ?>>一 周</option>
                </select> <span class="require">*</span> <span class="keep info">信息过期的时间</span><span class="keep success"></span><span class="keep error">请选择一个有效期!</span></dd>
                <dd><span class="head">信息标题：</span> <input type="text" name="title" class="text" value="<?php echo ($details["title"]); ?>"/>  <span class="require">*</span> <span class="title info">标题长度2~40位</span><span class="title success"></span><span class="title error">标题格式不合法!</span></dd>
                <?php if(is_array($attr)): $i = 0; $__LIST__ = $attr;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i; if($value['type'] == 0): ?><dd><span class="head"><?php echo ($value["name"]); ?>：</span> <input type="text" name="attr[<?php echo ($value["nickname"]); ?>]" class="text attr" value="<?php echo ($cattr[$value['nickname']]); ?>"/> <span class="require">*</span> <span class="attr_text info">请填写<?php echo ($value["name"]); ?></span><span class="attr_text success"></span><span class="attr_text error">此项不可忽略!</span></dd>
                <?php elseif($value['type'] == 1): ?>
                    <dd><span class="head"><?php echo ($value["name"]); ?>：</span> <select class="select" name="attr[<?php echo ($value["nickname"]); ?>]"> 
                        <?php if(is_array($value['details'])): $i = 0; $__LIST__ = $value['details'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; if(($cattr[$value['nickname']]) == $v): ?><option value="<?php echo ($v); ?>" selected="selected"><?php echo ($v); ?></option>
                        <?php else: ?>
                        <option value="<?php echo ($v); ?>"><?php echo ($v); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                    </select> <span class="require">*</span></dd>
                <?php elseif($value['type'] == 2): ?>
                    <dd style="width:390px;"><span class="head"><?php echo ($value["name"]); ?>：</span>
                    <?php if(is_array($value['details'])): $i = 0; $__LIST__ = $value['details'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><input type="checkbox" name="attr[<?php echo ($value["nickname"]); ?>][]" value="<?php echo ($v); ?>" class="attr_checkbox" <?php if(in_array($v,$cattr[$value['nickname']])): ?>checked=checked<?php endif; ?> /><?php echo ($v); ?>&nbsp;<?php endforeach; endif; else: echo "" ;endif; ?>
                        <span class="require">*</span><span class="attr_checkbox info">请选择<?php echo ($value["name"]); ?></span><span class="attr_checkbox success"></span><span class="attr_checkbox error">此项不可忽略!</span></dd>
                <?php elseif($value['type'] == 3): ?>
                    <dd><span class="head"><?php echo ($value["name"]); ?>：</span> 
                    <?php if(is_array($value['details'])): $i = 0; $__LIST__ = $value['details'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><input type="radio" name="attr[<?php echo ($value["nickname"]); ?>]" value="<?php echo ($v); ?>" <?php if(($cattr[$value['nickname']]) == $v): ?>checked=checked<?php endif; ?>/><?php echo ($v); ?>&nbsp;<?php endforeach; endif; else: echo "" ;endif; ?>
                        <span class="require">*</span><span class="attr_radio info">请选择<?php echo ($value["name"]); ?></span><span class="attr_radio success"></span><span class="attr_radio error">此项不可忽略!</span></dd><?php endif; ?>
                </dd><?php endforeach; endif; else: echo "" ;endif; ?>
                <dd class="up"><span class="up">上传图片：</span> <input type="text" name="thumbnail[]" class="text" readonly="readonly" value="<?php echo ($details['thumbnail'][0]); ?>"/> <input type="button"value="上传" onclick="window.open('__APP__/Public/uploads/num/1', 'pic', 'width=400,height=150,top=200,left=420');" class="bn"/>
                <input type="text" name="thumbnail[]" class="text" readonly="readonly" value="<?php echo ($details['thumbnail'][1]); ?>"/> <input type="button" value="上传" onclick="window.open('__APP__/Public/uploads/num/2', 'pic', 'width=400,height=150,top=200,left=420');" class="bn"/>
                <input type="text" name="thumbnail[]" class="text" readonly="readonly" value="<?php echo ($details['thumbnail'][2]); ?>"/> <input type="button"  value="上传" onclick="window.open('__APP__/Public/uploads/num/3', 'pic', 'width=400,height=150,top=200,left=420');" class="bn"/></dd>
                <dd><span class="t">详细填写：</span> <textarea name="content"><?php echo ($details["content"]); ?></textarea> <span class="require" style="vertical-align:85px">*</span></dd>
                <div class="important">
                    <dd><span class="head">联系人：</span> <input type="text" name="lianxi" class="text" value="<?php echo ($details["lianxi"]); ?>"/> <span class="require">*</span> <span class="lianxi info">联系人2~5位</span><span class="lianxi success"></span><span class="lianxi error">联系人格式不合法!</span></dd>
                    <dd><span class="head">联系手机：</span> <input type="text" name="phone" class="text" value="<?php echo ($details["phone"]); ?>"/> <span class="require">*</span> <span class="phone info">联系手机必须11位</span><span class="phone success"></span><span class="phone error">联系人电话不合法!</span></dd>
                    <dd><span class="head">联系QQ：</span> <input type="text" name="qq" class="text" value="<?php echo ($details["qq"]); ?>"/> <span class="require">*</span> <span class="qq info">QQ位数5~12位</span><span class="qq success"></span><span class="qq error">联系QQ不合法!</span></dd>
                    <dd><span class="head">电子邮箱：</span> <input type="text" name="email" class="text" value="<?php echo ($details["email"]); ?>"/> <span class="require">*</span> <span class="email info">填写电子邮件</span><span class="email success"></span><span class="email error">电子邮件不合法!</span></dd>
                </div>
                <dd class="c"><span class="head">验 证 码：</span> <input type="text" name="checkcode" class="check"/> <img src="__ROOT__/index.php/Public/checkCode" style="position:relative;top:10px;cursor:pointer;" onclick="this.src='__ROOT__/index.php/Public/checkCode/id/'+Math.random();" />  <span class="require">*</span> <span class="check loading"><img src="__ROOT__/Tpl/Public/images/loading2.gif" /></span><span class="check info">输入验证码</span><span class="check success"></span><span class="check error">验证码错误!</span></dd>
                <dd><input type="submit" name="send" value="修　改" class="sub"/></dd>
                <input type="hidden" id="flag" value="true"/>
                <input type="hidden" id="root" value="__ROOT__"/>
                <input type="hidden" name="id" value="<?php echo ($details["id"]); ?>"/>
            </dl>
        </form>
        
        
    </div>
<div id="flinks">
    <h2>友情链接</h2>  
    <ul>
        <?php if(is_array($flinks)): $i = 0; $__LIST__ = $flinks;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><li><a href="<?php echo ($value["url"]); ?>" target="_blank"><?php echo ($value["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>  
</div>
<div id="footer">
    <p>©三原县信息网 晋 ICP备12009119号</p>
    <p>Powered by 信息网 xxx.xxxx.xx</p>
</div>

</body>
</html>